package cn.tedu.rms.branch.controller;

import cn.tedu.rms.base.response.JsonResult;
import cn.tedu.rms.branch.pojo.dto.BranchQuery;
import cn.tedu.rms.branch.pojo.vo.BranchVO;
import cn.tedu.rms.branch.service.BranchService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Api(tags = "分店管理")
@Slf4j
@RequestMapping("/v1/beanch")
public class BranchController {
    @Autowired
    BranchService branchService;

    @GetMapping("/select")
    public JsonResult slectBranch(BranchQuery branchQuery){
        log.debug("查询分店:参数={}",branchQuery);
        List<BranchVO> list=branchService.selectBranch(branchQuery);
        return JsonResult.ok(list);
    }

}
